﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>工单查询</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <script src="components/requirejs/require.js" async="async" data-main="resources/js/query"></script>
    <link href="resources/css/common.css" rel="stylesheet" />
    <link href="resources/css/query.css" rel="stylesheet" />
</head>
<body>
    <div id="view">
        <div view v-if="isloading"></div>

        <div query>
            <div>
                <div center-v>
                    <select v-model="projectId">
                        <option value="">所有项目</option>
                        <option v-for="item in project" v-bind:value="item.id">{{item.name}}</option>
                    </select>
                </div>
                <div center>
                    <select v-model="incidentStatus" v-on:change="query(0)">
                        <option value="">全部</option>
                        <option value="新建">新建</option>
                        <option value="待分派">待分派</option>
                        <option value="待响应">待响应</option>
                        <option value="已到场">已到场</option>
                        <option value="待处理">待处理</option>
                        <option value="挂起中">挂起中</option>
                        <option value="待回访">待回访</option>
                        <option value="已关闭">已关闭</option>
                    </select>
                </div>
            </div>
        </div>
        <div query>
            <div>
                <div center-v>
                    <input type="text" placeholder="按单号/标题/内容查询" v-model="content" />
                </div>
                <div center v-on:click="query(0)">
                    <img src="resources/image/common/search.png" />
                </div>
            </div>
        </div>
        <div v-if="result.length > 0">
            <div flex result>
                <div>
                    <img src="resources/image/query/result.png" />
                </div>
                <div>
                    查询结果
                </div>
            </div>
            <div item v-for="item in result" v-on:click="gotoIncidentDetail(item.id, item.status)">
                <div>{{item.title}}</div>
                <div>
                    <div>申报时间：{{item.create_date}}</div>
                    <div>
                        <div fault v-if="item.incident_type">{{item.incident_type}}</div>
                    </div>
                </div>
            </div>
        </div>

        <div empty v-if="result.length == 0">
            <img src="resources/image/common/empty.png" />
            <div>暂无数据</div>
        </div>
    </div>
</body>
</html>